﻿using System;
using System.Collections.Generic;
using System.Linq;
using VelocityShop.Entities;
using VelocityShop.Data;

namespace VelocityShop
{
    public static class CatalogManager
    {
        public static Catalog GetCatalog()
        {
            ICatalogProvider CatalogProvider = DemoSettings.GetProvider();
            return CatalogProvider.GetCatalog();
        }

        public static IList<CatalogItem> GetItemsByCategory(string categoryId)
        {
            ICatalogProvider CatalogProvider = DemoSettings.GetProvider();
            return CatalogProvider.GetItemsByCategoryId(categoryId);
        }

        public static IList<CatalogItem> GetItemsByTag(string categoryId,string tag)
        {
            ICatalogProvider CatalogProvider = DemoSettings.GetProvider();
            return CatalogProvider.GetItemsByTag(categoryId,tag);
        }

        public static void InsertCatalogItem(string categoryId, CatalogItem item)
        {
            ICatalogProvider CatalogProvider = DemoSettings.GetProvider();
            CatalogProvider.InsertCatalogItem(categoryId,item);
        }

    }
}